#ifndef VRP_LIGHTS_INCLUDED
#define VRP_LIGHTS_INCLUDED
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
#include "Shaders/VLitInput.hlsl"


Light GetMyMainLight()
{
    Light light;
    light.direction = half3(_VMainLightDirection.xyz);
    
    light.distanceAttenuation = 1.0;
    light.shadowAttenuation = 1.0;
    light.color = _VMainLightColor.rgb;
    
    light.layerMask = DEFAULT_LIGHT_LAYERS;
  

    return light;
}


int GetMyAdditionalLightsCount()
{
    return int(_AdditionalLightsCount.x);
}
Light GetMyAdditionalLight(int index, float3 positionWS)
{
    float4 lightPositionWS = _AdditionalLightsPosition[index];
    half3 color = _AdditionalLightsColor[index].rgb;

    float3 lightVector = lightPositionWS.xyz - positionWS * lightPositionWS.w;
    Light light;
    light.direction = lightVector;
    light.shadowAttenuation = 1.0; // This value can later be overridden in GetAdditionalLight(uint i, float3 positionWS, half4 shadowMask)
    light.color = color;
    return light;
}
#endif